﻿drop procedure [admin_azad].SP_FeedBackSave

Go
/****** Object:  StoredProcedure [admin_azad].[SP_FeedBackSave]    Script Date: 01/15/2012 20:04:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Create PROCEDURE [SP_FeedBackSave]
			@Id int OUTPUT,
			@Name varchar(250)
           ,@Subject varchar(250)
           ,@Email varchar(250)
           ,@Descriptions varchar(500)
           ,@CreatedDate datetime
AS
BEGIN
	INSERT INTO [dbo].[Feedback]
           ([Name]
           ,[Subject]
           ,[Email]
           ,[Descriptions]
           ,[CreatedDate])
     VALUES
           (@Name
           ,@Subject
           ,@Email
           ,@Descriptions
           ,@CreatedDate)

		   SET @Id = SCOPE_IDENTITY()  


END

Go

drop Proc [admin_azad].[GetAllPagesForRights]    


GO
/****** Object:  StoredProcedure [admin_azad].[GetAllPagesForRights]    Script Date: 01/15/2012 20:08:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Create Proc [GetAllPagesForRights]    
(    
 @UserType int    
)    
as    
Begin    
    
select tb.PageId,PageName,PageURL,DefaultPage,PageParentID ,    
Case   when tur.PageId is null then 0 else 1 end as IsExists    
from tblSitePages tb     
left join tblUserRights tur    
on tb.PageId= tur.pageid and UserTypeid=@UserType    
    
end


Go

drop proc [admin_azad].[Get_FeedBackTwoDates]

USE [azad]
GO
/****** Object:  StoredProcedure [admin_azad].[Get_FeedBackTwoDates]    Script Date: 01/15/2012 20:09:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Create PROCEDURE [Get_FeedBackTwoDates]
	@Todate datetime,
	@FromDate datetime
AS
BEGIN
	
Select * from Feedback
where CreatedDate between @Todate and @FromDate
END